<template>
    <div>
      <el-dialog title="商品列表" :visible.sync="isVisible" width="100%" customClass="zdyDialogCls goodsDialogCls" :before-close="handleClose">
        <good-list v-if="isVisible" :checked="checked" @getChangeRowEmit="getChangeRowEmit"></good-list>
      </el-dialog>
    </div>
</template>

<script>
  import goodList from "@/components/goodList/index";

  export default {
    name: "index",
    components: {
      goodList
    },
    data() {
      return {
        handleNum: '',
        isVisible: false,
        checked: [],
        callback: function() {}
      };
    },
    methods: {
      handleClose() {
        this.$set(this, 'isVisible', false);
      },
      getChangeRowEmit(row) {
        this.callback(row);
        this.$set(this, 'isVisible', false);
      }
    }
  }
</script>

<style scoped>

</style>

<style lang="scss">
  .el-dialog.goodsDialogCls {
    max-width: 900px;
  }
</style>
